package dao;


import java.util.List;

import util.Page;

import model.Course;

public interface CourseDAO {
	/**
	 * ������пγ�
	 * @param pageNo ҳ��
	 * @param pageSize ÿҳ����
	 * @return
	 */
	public Page<Course> getAllCourse(int pageNo,int pageSize);
	/**
	 * 
	 * @param pageNo
	 * @param pageSize
	 * @param name �γ���
	 * @return
	 */
	public Page<Course> getCourseByName(int pageNo,int pageSize,String name);
	/**
	 * ���id���ؿγ̶���
	 * @param id
	 * @return
	 */
	public Course getById(int id);
	/**
	 * ���һ�ſγ����󷵻�true
	 * @param course
	 * @return
	 */
	public boolean addCourse(Course course);
	/**
	 * ��ݴ���Ŀγ̶�����¿γ���Ϣ
	 * @param course
	 * @return
	 */
	public boolean updateCourse(Course course);
	/**
	 * ��ݿγ���鿴�Ƿ����
	 * @param name�γ���
	 * @return
	 */
	public boolean ifExists(String name);
	/**
	 * ��ݿγ�
	 * @param course
	 * @return
	 */
	public boolean deleteByCourse(Course course);
	/**
	 * ���idɾ��
	 * @param id
	 * @return
	 */
	public boolean deleteByCourseId(int id);
	/**
	 * �������пγ�
	 * @return
	 */
	public List<Course>getAll();
	public Page<Course> getByTime(int pageNo, int pageSize,double time);
}
